﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
			String basePath = request.getScheme() + "://"
					+ request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>企业生产管理系统</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<link href="css/main.css" rel="stylesheet" type="text/css">
		<link href="css/style.css" rel="stylesheet" type="text/css">
		<script src="./js/jquery-1.7.2.min.js" type="text/javascript"></script>
	</head>
	<s:if test="msg=='success'">
		<script>
		window.open("frame.jsp", "_self", "width=" + (screen.availWidth - 8)
			+ ",height=" + (screen.availHeight - 24) + ",top=0,left=0");
		</script>
	</s:if>
	<s:elseif test="msg=='invalidAccount'">
		<script>alert('用户名或密码错误!');</script>
	</s:elseif>
	<s:elseif test="msg=='usernameEmpty'">
		<script>alert('用户名不能为空!');</script>
	</s:elseif>
	<s:elseif test="msg=='usernameMoreThan20'">
		<script>alert('用户名不能大于20个字符!');</script>
	</s:elseif>
	<s:elseif test="msg=='passwordEmpty'">
		<script>alert('密码不能为空!');</script>
	</s:elseif>
	<s:elseif test="msg=='passwordMoreThan20'">
		<script>alert('密码不能大于20个字符!');</script>
	</s:elseif>
	<s:elseif test="msg=='checkCodeError'">
		<script>
	alert('验证码错误！');
</script>
	</s:elseif>
	<style type="text/css">
<!--
.byte {
	BORDER-TOP-WIDTH: 0px;
	BORDER-LEFT-WIDTH: 0px;
	BACKGROUND: none transparent scroll repeat 0% 0%;
	BORDER-BOTTOM-WIDTH: 0px;
	MARGIN: 0px;
	VERTICAL-ALIGN: middle;
	WIDTH: 152px;
	BORDER-RIGHT-WIDTH: 0px
}
-->
</style>
<script type="text/javascript">
if (self!=top) {
	window.parent.location.reload();
}
$(document).ready(function() {
	$("#userName").focus();
	$("#password").val("");
});
</script>
	<body>
		<p> 
			&nbsp; <br></p><p><br></p>
		<form name="form1" method="post" action="login.action" id="login_frm">
			<table id="login_tab" align="center" cellpadding="0" cellspacing="0"
				background="images/login.jpg">
				<tr>
					<td id="top_td">
						&nbsp;
					</td>
					<td>
						<table style="margin:0px; padding:0xpx; height:100%;">
						    <tr>
						    	<td height="236px;"></td>
						    </tr>
							<tr>
								<td style="vertical-align: bottom;">
									<input name="userName" id="userName" type="text" value='<s:property value="userName"/>' class="byte" maxlength="20" />
									<!--  <input name="userName" id="userName" type="text" value='admin' class="byte" maxlength="20" />-->
								</td>
							</tr>
							<tr>
								<td style="vertical-align: bottom;">
									<input name="password" id="password" type="password" class="byte" maxlength="20" />
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						&nbsp;
					</td>
					<td id="cen_td">
						<input type="submit"" value="用户登录"/>
					</td>
				</tr>
				<tr>
					<td>
						&nbsp;
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
